#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

string largestNumber(vector<int>& nums) {
    vector<string> str;
    for (auto e : nums)
        str.push_back(to_string(e));

    sort(str.begin(), str.end(), [](const string& s1, const string& s2) {
        return s1 + s2 > s2 + s1;
        });

    string ret;
    if (str[0] == "0")
        return "0";
    for (auto s : str)
        ret += s;
    return ret;
}

int main()
{

	return 0;
}